<?php
//前台商城详情控制器
namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Requests;

class MallController extends CommonController
{ 
	public function index()
    {
    }
    //加载前台网站详情信息页
	public function show($mid)
	{
		$f = \DB::table("m_forum")->get();
		$t = \DB::table("m_type")->get();
		$g = \DB::table("m_genre")->get();
		$z = \DB::table("notice")->where('status','0')->get();
		$n = \DB::table("notice")->where('status','1')->get();
		$fl = \DB::table("friendlink")->get();
		$p = \DB::table("m_pic")->where("mid",$mid)->get();
		$s = \DB::table("m_search")->where("mid",$mid)->first();
		$m = \DB::table("m_info")->where("mid",$mid)->first();
		\DB::table("m_info")->where("mid",$mid)->update(['comeclick'=> $m->comeclick+1]);
		return view("home.mall",['forum'=>$f, 'genre'=>$g, 'type'=>$t, 'notice'=>$n,'notices'=>$z, 'friendlink'=>$fl, 'minfo'=>$m, 'search'=>$s, 'pic'=>$p]);
	}
}
